widget: Queue an allocate on hide
authorBenjamin Otte <otte@redhat.com>
Tue, 3 Nov 2015 17:53:45 +0000 (18:53 +0100)
committerBenjamin Otte <otte@redhat.com>
Tue, 3 Nov 2015 17:57:14 +0000 (18:57 +0100)
This makes sure that hidden widgets always have priv->alloc_needed set
on them.

The constructor sets that flag, so we want to have it back when we
revert to this state.

This fixes GtkWindow skipping a size_allocate() when reshowing a
previously hidden window and thereby not updating its allocation and
clip. And that in turn would lead to draws not happening and us beig
left with a black window.

gtk/gtkwidget.c

index 42bf421cee2a259c41c58840ae77afcf62888c12..50bf5fc9dfd05de3a5432b1bad59cb5f113866bb 100644 (file)
@@ -4863,6 +4863,8 @@ gtk_widget_hide (GtkWidget *widget)
       if (parent)
        gtk_widget_queue_resize (parent);
 
+      gtk_widget_queue_allocate (widget);
+
       gtk_widget_pop_verify_invariants (widget);
       g_object_unref (widget);
     }